package com.gszcn.tools.table.metadata.javadoc;

import java.util.ArrayList;
import java.util.List;

/**
 * 存放类信息
 */
public class SqlJSON {
    /**
     * 类名
     */
    private String classname;

    private List <SqlItem> sqlItems = new ArrayList <SqlItem>();

    private String comment;

    public SqlJSON name(String substring) {
        this.classname = substring;
        return this;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public String getClassname() {
        return classname;
    }

    public List <SqlItem> getSqlItems() {
        return sqlItems;
    }

    /**
     * 添加属性
     * @param sqlItem
     * @return SqlJSON;
     */
    public SqlJSON addSqlItem(SqlItem sqlItem) {
        this.sqlItems.add(sqlItem);
        return this;
    }

    @Override
    public String toString() {
        return "SqlJSON{" +
                "classname='" + classname + '\'' +
                ", sqlItems=" + sqlItems +
                '}';
    }
}
